-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add in-source-config detection to listFunctions #899
Conversation
(currently only based on config that's passed in)
pre-released to https://www.npmjs.com/package/@netlify/zip-it-and-ship-it/v/5.4.0-isc-listfunctions to continue work on the CLI |
parseISC?: boolean | ||
} | ||
|
||
interface AugmentedFunctionSource extends FunctionSource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[dust] Currently, this type only differs from FunctionSource
in that it also includes ISC. Are you thinking it may be used in the future for other things? If we introduce new options to listFunctions
, would that not be under a different conditional check than parseISC
? And if so, do you think this should be called something like FunctionSourceWithISC
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the AugmentedFunctionSource
type is really the input type to getListedFunction
. it's FunctionSource
+ whatever may need to be added to assemble the return value of listFunctions
and listFunction
. If there was a new flag, let's say enablePartyMode
, then we can extend AugmentedFunctionSource
to have an partyModeResult?: Parteyyy
property, and getListedFunction
could use that to assemble the return value.
Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com>
Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
…-and-ship-it#899) * feat: schedule property to listFunctions result (currently only based on config that's passed in) * feat: include schedule in listFunctionsFiles and fix remaining tests * feat: run ISC on listFunctions * chore: add test for isc + listFunctionsFiles * feat: add rough implementation of listFunction * refactor: only parse one file for listFunction * refactor: use same runtime order across implementations * refactor: extract fscache comment * feat: add getFunctionAtPath implementation to other runtimes * refactor: conform node runtime to types * refactor: only parse ISC conditionally * refactor: rename parameter * refactor: rename to findFunctionInPath * fix: please prettier * chore: make comment more precise Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com> * chore: add comment about ISC condition Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com> Co-authored-by: Netlify Team Account 1 <netlify-team-account-1@users.noreply.github.com> Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com>
- Summary
As discussed on Friday, this PR adds ISC to
listFunctions
(8537a80...11e7c92). It also adds alistFunction
(singular) version (11e7c92...402c013).- Test plan
Tests added.
- A picture of a cute animal (not mandatory but encouraged)